package com.liuyi.tools.kits;
import com.liuyi.tools.web.unusual.BizEnum;
import com.liuyi.tools.web.unusual.BizException;

/**
 * @author Mr.fmy
 * @version 1.0.0
 * @ClassName ExceptionTool.java
 * @Description TODO 异常高频方法
 * @createTime 2019年07月11日 10:13:00
 */
public class BizExceptionKit {


    public static void throwBusiness(boolean is, String errMsg) {
        throwBusiness(is, new BizException(errMsg));
    }

    public static void throwBusiness(boolean is, BizEnum iEnum, String errMsg) {
        throwBusiness(is, new BizException(iEnum, errMsg));
    }

    public static void throwBusiness(boolean is, BizException e) {
        if (is) throw e;
    }
}
